package com.feng.annotation.bean;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

/**
 * @author Lee
 * @date 2019/3/5
 */
@Data
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class Person {

    private Integer id;

    private String name;

    private Integer age;

    @PostConstruct
    public void init(){
        System.out.println("Person's init");
    }

    @PreDestroy
    public void destroy(){
        System.out.println("Person's destroy");
    }

}
